window: Fallback to CSD titlebar in focus-chain
authorAndrea Azzarone <azzaronea@gmail.com>
Thu, 26 Jul 2018 08:16:32 +0000 (10:16 +0200)
committerAndrea Azzarone <andrea.azzarone@canonical.com>
Mon, 30 Jul 2018 07:30:26 +0000 (09:30 +0200)
commite1a7629a85151cc616247f0ae8c80b3c512568d8
treee191d96a15e77337f4b32f711790deb2a8e267bf
parent7d3b8b0d09b0a11e2d51fcc015bce86b60e4b660
window: Fallback to CSD titlebar in focus-chain

CSD titlebar are included in the focus-chain. The logic used makes sure that the
initial focus avoids the titlebar, but tabbing around will eventually get there.
This logic fails in case the window has no other focusable widgets apart from
the ones in the header-bar. If this happens keynav focus will be lost. To handle
the above scenario, we need to fallback to focus the header-bar (if any).

Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/404
gtk/gtkwindow.c